<template>
	<view class="memberInformation_container">
		<view style="height: 160rpx;">
			<view class="mail_List" style="position: fixed;">
				<view class="mail" style="font-weight: 700;">
					<view class="order">业主详情</view>
				</view>
			</view>
			<view class="icon" style="position: fixed;">
				<u-icon name="arrow-left" color="#fff" size="40" @click="navigateBack"></u-icon>
			</view>
		</view>
		<!-- 业主信息 -->
		<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">业主信息</text>
		</view>
		<view class="card_three" style="padding: 0 42rpx;">
			<u-form :model="form" ref="uForm" >    
				<u-form-item label="用户姓名:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.ownerName"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="联系方式:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.ownerPhone"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="性别:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.gender=='0'?'男':'女'"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="政治面貌:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.politicsStatus=='0'? '党员' : particulars.politicsStatus=='1'? '团员' :'其他' "
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="籍贯:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.nativePlace"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="登记地址:">
					<u-input v-model="form.address " 
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.communityAddress"
						 :clearable="false" :disabled="true" />
<!-- 					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="Y32#-504室"
						:clearable="false" :disabled="true" /> -->
				</u-form-item>
			</u-form>
		</view>
		<!-- 成员信息 -->
		<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">成员信息</text>
		</view>
		<view class="card" style="padding: 0 42rpx;">
			<u-form :model="form" ref="uForm">
				<u-form-item label="家庭成员:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.familyMember+'人'"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="租客成员:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.tenantMember+'人'"
						:clearable="false" :disabled="true" />
				</u-form-item>
			</u-form>
		</view>
		<!-- 资产信息 -->
		<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">资产信息</text>
		</view>
		<view class="card" style="padding: 0 42rpx;">
			<u-form :model="form" ref="uForm">
				<u-form-item label="社区房产:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.communityProperty"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="登记车辆:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.registeredVehicles"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="租/购车位:">
					<u-input v-model="form.address"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.carportNo"
						:clearable="false" :disabled="true" />
				</u-form-item>
			</u-form>
		</view>
	</view>
</template>

<script>
	import readingDetails from "@/components/readingDetails/readingDetails.vue"
	export default {
		components: {
			readingDetails
		},
		data() {
			return {
				// form表单
				form: {
					Reporter: '',
					title: '',
					address: '',
					describe: '',
					chargePerson: '',
					Executor: '',
					Maintenance: '',
					end: '',
				},
				// 演示地址，请勿直接使用
				action: 'http://www.example.com/upload',
				current: 1,
				return: 1,
				// 用户id
				ownerId:'',
				// 业主详情
				particulars:'',
				// 搜索内容
				nameOrPhone: '',
			}
		},
		onLoad(val) {
			this.loginId = uni.getStorageSync("setModel")
			if(val.ownerId){
			this.ownerId=val.ownerId
				this.ownerInformation()
			} else {
				this.nameOrPhone=val.nameOrPhone
				this.searchDetails()
			}
		},
		methods: {
			resolved() {
				this.current = 5
			},
			Approved() {
				this.current = 6
			},
			navigateBack() {
				if (this.current == 5 || this.current == 6) {
					this.current = 1
					this.return++
					if (this.return == 3) {
						console.log(111)
						uni.navigateBack()
					}
				} else {
					this.current = 1
					if (this.return == 1 || this.return == 2) {
						console.log(111)
						uni.navigateBack()
					}
				}
			},
			// 业主详情信息
			ownerInformation() {
				this.$http.get('informationInquiry/getOwnerById',{
					ownerId:this.ownerId,
					loginId:this.loginId.userId,
					deptId:this.loginId.deptId
					}).then(res => {
					this.particulars=res.data
					console.log(res, '课程分类')
					// this.owners = res.data
				})
			},
			// 搜索业主详情信息
			searchDetails() {
				this.$http.get('informationInquiry/ownerInformation', {
					nameOrPhone: this.nameOrPhone,
					loginId:this.loginId.userId,
					deptId:this.loginId.deptId
				}).then(res => {
					this.particulars=res.data
					console.log(res)
					})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.memberInformation_container {
		.mail_List {
			overflow: hidden;
			width: 100%;
			background-color: #f2f2f2;

			.mail {
				height: 160rpx;
				line-height: 230rpx;
				color: #fff;
				font-size: 40rpx;
				background-color: #2a4f65;
			}

			.order {
				text-align: center;
			}
		}

		/deep/.card {
			.u-form-item--left {
				flex: unset !important;
				width: unset !important;
			}

			.frequency {
				display: flex;

				u-input {
					flex: 2;
				}
			}

			.example {
				display: flex;
				margin-left: 67rpx;
			}

			u-form-item:nth-child(9) {
				.u-form-item {
					padding: 20rpx 0 0 0;
				}
			}
		}

		/deep/.card_two {
			.u-form-item--left {
				flex: unset !important;
				width: unset !important;
			}

			.frequency {
				display: flex;

				u-input {
					flex: 2;
				}
			}

			.example {
				display: flex;
				margin-left: 67rpx;
			}

			.u-form-item--right {
				margin-left: 31rpx;
			}
		}

		/deep/.card_three {
			.u-form-item--left {
				flex: unset !important;
				width: unset !important;
			}

			.frequency {
				display: flex;

				u-input {
					flex: 2;
				}
			}

			.example {
				display: flex;
				margin-left: 67rpx;
			}

			u-form-item:nth-child(6) {
				.u-form-item--right {
					margin-left: 31rpx;
				}

				.u-input__input {
					min-height: 42rpx !important;
				}
			}
		}

		.icon {
			position: absolute;
			top: 96rpx;
			left: 20rpx;
		}

		.second_card {
			.u-cell {
				padding: 18rpx 32rpx;

				/deep/.u-cell__value {
					color: #333333;
					font-weight: 600;
				}
			}

			/deep/.uni-card__content {
				padding: 16rpx 24rpx;
			}
		}

		/deep/button {
			border-radius: unset !important;
		}

		.uni-border[data-v-19622063]:after {
			border: unset;
		}

		/deep/.uni-border.data-v-19622063:after {
			border: unset;
		}

		.slot-btn__hover {
			background-color: rgb(235, 236, 238);
		}

		.button {
			display: flex;
			position: fixed;
			left: 0;
			right: 0;
			bottom: 0;
			margin-top: 200rpx;
			border-radius: 14rpx;
			overflow: hidden;
			z-index: 9;

			.u-btn {
				border-radius: unset;
			}
		}

		.button_two {
			display: flex;
			// position: fixed;
			// left: 0;
			// right: 0;
			// bottom: 0;
			margin-top: 200rpx;
			border-radius: 14rpx;
			overflow: hidden;
			z-index: 9;

			.u-btn {
				border-radius: unset;
			}
		}

		.work_Order {
			margin-top: 60rpx;
			text-align: center;

			.work_Order_top {
				width: 168rpx;
				height: 168rpx;
				margin: 0 auto;
				background-color: #e5e5e5;
				border-radius: 50%;
			}
		}
	}
</style>
